package com.kma.ncpractice2013.dao;

import java.util.Collection;
import javax.sql.DataSource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;

public abstract class DAO<T>
{
    //@Autowired
    protected JdbcTemplate jdbcTemplate;
    public void setDataSource()
    {
        jdbcTemplate = Connector.getJDBCTemplate();
    }
	public DAO()
	{
		setDataSource();
	}
    public abstract void create(T o);
    public abstract void update(T o);
    public abstract T getById(int id);
    public abstract Collection<T> getAll();
    public abstract void deleteById(int id);
}
